﻿using System;

namespace AzureToolkit
{

    public interface IAzureStorageFactory
    {
        /// <summary>
        /// Gets or sets the account.
        /// </summary>
        /// <value>The account.</value>
        Microsoft.WindowsAzure.CloudStorageAccount Account { get; set; }

        /// <summary>
        /// Gets the entities container.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="containerName">Name of the container.</param>
        /// <returns></returns>
        IAzureBlobContainer<T> GetEntitiesContainer<T>(string containerName);
        /// <summary>
        /// Gets the file container.
        /// </summary>
        /// <param name="containerName">Name of the container.</param>
        /// <param name="containerType">Type of the container.</param>
        /// <returns></returns>
        IAzureBlobContainer<byte[]> GetFileContainer(string containerName, string containerType);
        /// <summary>
        /// Gets the file container.
        /// </summary>
        /// <param name="containerName">Name of the container.</param>
        /// <param name="containerType">Type of the container.</param>
        /// <param name="blobContainerPermissions">The BLOB container permissions.</param>
        /// <returns></returns>
        IAzureBlobContainer<byte[]> GetFileContainer(string containerName, string containerType, Microsoft.WindowsAzure.StorageClient.BlobContainerPermissions blobContainerPermissions);
        /// <summary>
        /// Gets the queue.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="queueName">Name of the queue.</param>
        /// <returns></returns>
        IAzureQueue<T> GetQueue<T>(string queueName) where T : IAzureQueueMessage;
        /// <summary>
        /// Gets the queue.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="queueName">Name of the queue.</param>
        /// <param name="visibilityTimeout">The visibility timeout.</param>
        /// <returns></returns>
        IAzureQueue<T> GetQueue<T>(string queueName, TimeSpan visibilityTimeout) where T : IAzureQueueMessage;
        /// <summary>
        /// Gets the table.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="tableName">Name of the table.</param>
        /// <returns></returns>
        IAzureTable<T> GetTable<T>(string tableName) where T : Microsoft.WindowsAzure.StorageClient.TableServiceEntity;
    }
}
